﻿CREATE TABLE [dbo].[BlankettFalt]
(
	[Id] UNIQUEIDENTIFIER NOT NULL, 
	[ValId] UNIQUEIDENTIFIER NOT NULL,
    [BlankettId] UNIQUEIDENTIFIER NOT NULL, 
    [FaltId] UNIQUEIDENTIFIER NOT NULL, 
	[RadIndex] INT NOT NULL, 
    CONSTRAINT [PK_BlankettFalt] PRIMARY KEY CLUSTERED ([Id] ASC, [ValId] ASC),
    CONSTRAINT [FK_BlankettFalt_ToBlankett] FOREIGN KEY ([BlankettId], [ValId]) REFERENCES [Blankett]([Id], [ValId]), 
    CONSTRAINT [FK_BlankettFalt_ToFalt] FOREIGN KEY ([FaltId], [ValId]) REFERENCES [Falt]([Id], [ValId])
)